// 变分模板用于点云特征提取
template <typename PointT, typename... FeatureExtractors>
class PointCloudProcessor
{
public:
    // 处理点云并提取所有特征
    void process(const std::vector<PointT> &points)
    {
        // 展开变参模板，依次调用每个特征提取器
        (extract_feature<FeatureExtractors>(points), ...);
    }

private:
    // 单个特征提取器的处理
    template <typename ExtractorT>
    void extract_feature(const std::vector<PointT> &points)
    {
        ExtractorT extractor;
        auto features = extractor.compute(points);
        std::cout << "Extracted " << features.size()
                  << " features using " << typeid(ExtractorT).name() << std::endl;
    }
};

// 使用示例
void process_lidar_data()
{
    std::vector<Point3D> points = load_point_cloud();

    // 创建处理器，指定多个特征提取器
    PointCloudProcessor<Point3D,
                        NormalEstimator,
                        FPFHExtractor,
                        VFHExtractor>
        processor;

    // 一次调用处理所有特征
    processor.process(points);
}